package com.panda.game.xls.action;

import javax.swing.*;
import java.awt.event.ActionEvent;

public abstract class MyAbstractAction extends AbstractAction {

    protected String type;

    protected abstract void beforeAction(ActionEvent e);

    protected abstract void doAction(ActionEvent e);

    protected abstract void afterAction(ActionEvent e);

    @Override
    public void actionPerformed(ActionEvent e) {
        beforeAction(e);
        doAction(e);
        afterAction(e);
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
